package com.prime.service;

import com.prime.common.MyException;
import com.prime.dao.DemoDao;
import com.prime.entity.Demo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by cph on 17/8/29.
 */
@Service
public class DemoService {

    @Autowired
    private DemoDao demoDao;

    public List<Demo> findByWhere(Map<String, Object> params) {
        return demoDao.findByWhere(params);
    }

    public String get(Map<String, Object> params) {
        String a  = null;
//        a.equals("sss");
            throw new MyException("aaaa");
//        long a = demoDao.create(params);
//        if (a > 0)
//            return "success";
//        else
//            return "11";
    }

}
